import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Horizontal here.
 * 
 * @author rolando delgado salcedo
 * @version version 1
 */
public class Horizontal extends Obstaculo
{
    /**
     * Act - do whatever the Horizontal wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     * metodo actua que mueve el obstaculo
     */
    public void act() 
    {
        
    mover();
 
    }    
    /**
     * metodo mover el cual checa si es limite cambia de direccion para que se mueva de izquierda
     * a derecha
     */
    public void mover()
   {
           if(super.eslimite())
        {
            turn(180);
        }
        move(2);
    }
}
